﻿using System;
using System.Collections.Generic;

namespace RexToy.ExpressionLanguage
{
    class EvalContext : IEvalContext
    {
        private Dictionary<string, object> _dict;
        public EvalContext()
        {
            _dict = new Dictionary<string, object>();
        }

        #region IEvalContext Members

        public object Resolve(string param)
        {
            return _dict[param];
        }

        public void Assign(string param, object val)
        {
            _dict[param] = val;
        }

        #endregion
    }
}
